home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW Related / Lurkers 1.7 / NameRevisionCurrent < prev   
Encoding:
Text File  |  1997-11-11  |  1.5 KB  |  57 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        NameRevisionCurrent
  3. #
  4. #    Contains:    Script that creates a namerevision of the files currently checked
  5. #                out on this machine.  Different from NameRevisions, which always
  6. #                applies the namerevision to the newest files in the project, which
  7. #                could be different if someone else checks in some new files.
  8. #
  9. #                Usage:
  10. #
  11. #                    NameRevisionCurrent ProjectName "New revision name"
  12. #
  13. #                Requires Lurkers v1.6 or later
  14. #
  15. #    Written by:    Greg Anderson
  16. #
  17. #    Copyright:    © 1994 by Apple Computer, Inc., all rights reserved.
  18. #
  19. #    Change History (most recent first):
  20. #
  21. #         <1>      6/8/94    ga        first checked in
  22. #
  23. #
  24.  
  25. #
  26. # We always expect two parameters
  27. #
  28. if {#} ≠ 2
  29.     echo "### NameRevisoinCurrent ProjectName RevisionName"
  30.     exit 1
  31. end
  32.  
  33. set ProjectName "{1}"
  34. set RevisionName "{2}"
  35.  
  36. Set OldExit {Exit}
  37.  
  38. #
  39. # We must explicitly iterate over the subprojects of the specified project
  40. # name, because NameRevisions -r just doesn't work right if you specify
  41. # the exact set of files to include in the revision
  42. #
  43. for subproject in `projectinfo -project "{ProjectName}" -r -s -only`
  44.     #
  45.     # Find the folder that files from this project are checked out into
  46.     #
  47.     if "`CheckOutDir -project "{subproject}"`" =~ /CheckOutDir -project ≈∫ (≈)®1/
  48.         #
  49.         # Use 'Lurkers' to find out the revision number of the currently checked
  50.         # out files in this directory
  51.         #
  52.         Set RequestDir "{®1}"
  53.         NameRevisions -project "{subproject}" "{{RevisionName}}" -replace `Lurkers -insomeproject -rev -s "{RequestDir}"`
  54.     end
  55. end
  56.  
  57. Set Exit {OldExit}